#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    int n0,n1,n;
    cin >> n0 >> n1 >> n;
    //int x;  //FemaleRoom
    //int y;   //MaleRoom
    bool ifSolution = false;
    int optimalX;
    int optimalY;
    int optimalDiff = (n0>n1 ? n0 : n1);
  
    for(int x = 1; x <n; x++)
    {
        int y = n -x;
        if((n0%x == 0) && (n0/x >=2) && (n1%y == 0) &&(n1/y >=2))
            {
    
                ifSolution = true;
                if(abs(n0/x-n1/y) < optimalDiff)
                {
                    optimalX = x;
                    optimalY = y;
                    optimalDiff = abs(n0/x-n1/y);
                }
            }
    }
    
    if(ifSolution == true)
    {
        cout << optimalX << " "<< optimalY;
    }
    else
    {
        cout << "No Solution";
    }
}